// components/search/search.js
let app=getApp();
Component({
      /**
       * 组件的属性列表
       */
      properties: {

      },

      /**
       * 组件的初始数据
       */
      data: {
            showBg:getApp().globalData.showBg
      },

      /**
       * 组件的方法列表
       */
      methods: {
            toSearch(){
                  wx.navigateTo({
                    url: '/pages/search/search'
                  })
            },
            watchDrinks(res){
                  console.log(res);
            },
            onLoad:function (params) {
                  let that=this;
                  app.watch(that.watchDrinks,"showBg");
            }
      },
      onLoad:function (params) {
            let that=this;
            app.watch(that.watchDrinks,"showBg");
      }
})
